package com.go.where.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.manager.dao.CustomerScoreDao;
import com.go.where.manager.page.Pagination;
import com.go.where.manager.pojo.CustomerScoreInfo;
import com.go.where.manager.service.CustomerScoreService;

@Service("customerScoreService")
public class CustomerScoreServiceImpl implements CustomerScoreService {

	@Resource(name = "customerScoreDao")
	private CustomerScoreDao customerScoreDao;

	@Override
	public Pagination<CustomerScoreInfo> queryPage(
			CustomerScoreInfo customerInfo) {
		Integer count = customerScoreDao.totalCount(customerInfo);
		customerInfo.calculate();
		List<CustomerScoreInfo> list = customerScoreDao.queryList(customerInfo);
		Pagination<CustomerScoreInfo> page = customerScoreDao.queryPagination(
				count, list, customerInfo);
		return page;
	}

}
